<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>帖子列表</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">

		<link rel="stylesheet" type="text/css"
			href="./styles/post_list_style.css">
		<link rel="stylesheet" type="text/css"
			href="./styles/bbs_index_style.css">
         <link rel="stylesheet" type="text/css"
			href="./styles/tr_style.css">
			 <script type="text/javascript" src="./javaScripts/tr_toggle.js"></script>
	</head>

	<body>
	  <pg:pager url="bbs/module/module_titleByModule"  maxIndexPages="10"  maxPageItems="4" scope="request" export="currentPageNumber=pageNumber" >
	  
		<div class="post_body">
		    
			<div>
				<table width="100%">
					<tr>
						<td>
						  <div style="height: 20px; border: 0px solid #cccccc">
			<table width="100%"
				style="font-size: 12px; " border="0">
				 <tr>
				   <td colspan="2"><div style="text-align: left;width: 100%;line-height: 20px" class="tip_a">当前位置：<a href="<%=basePath%>index.jsp">首页</a><span>&nbsp;>>&nbsp;</span><a href="<%=basePath%>bbs/index.jsp">论坛</a><span>&nbsp;>>&nbsp;</span>
				    <a href=" <s:property value="#session.moduleDTO.parentURL"/>">
									<s:property value="#session.moduleDTO.parentName" />
								</a><span>&nbsp;>>&nbsp;</span><s:property
										value="#session.moduleDTO.moduleName" />  
				   </div></td>
				 </tr>
				 
			</table>
		</div>		 
						</td>
					</tr>
					<tr>
						<td>
							<div style="height: 32px;">
								<table width="100%">
									<tr>
										<td width="60%" align="left">
											 	 
										</td>
										<td width="40%" align="right">
											<a href="./bbs/editor.jsp"><img
													src="./images/newtopic.gif" border="0" />
											</a>
										</td>
									</tr>
								</table>
							</div>
						</td>
					</tr>
				</table>
			</div>
			<div class="content_con">
				<div class="content_con_header">
					<table width="100%" cellpadding="0" cellspacing="0" border="0">
						<tr>
							<td align="left" class="tb_left" valign="middle">
								<s:property value="#session.moduleDTO.moduleName" />
							</td>
							<td align="right" class="tb_right" valign="middle">
								|
							</td>
						</tr>
					</table>
				</div>
				<div class="contant_con_con_001">
					<table width="100%" cellpadding="0" cellspacing="0" border="0">
						<tr>
							<td width="40%" valign="middle" align="center">
								标题
							</td>
							<td width="10%" valign="middle" align="center">
								作者
							</td>
							<td width="10%" valign="middle" align="center">
								回复/查看
							</td>
							<td width="40%" valign="middle" align="center">
								最后发表
							</td>
						</tr>
					</table>
				</div>
				
				<div class="contant_con_con_002">
					<table width="100%" cellpadding="0" cellspacing="0" border="0" class="tb_msg_">
						<s:iterator value="#session.postList" var="post">
						<pg:item>
							<tr>
								<td width="40%" valign="middle" align="center">
									<a href="bbs/post/post_queryPostById?id=<s:property value="#post.id" />"><s:property value="#post.title" /></a>
								</td>
								<td width="10%" valign="middle" align="center">
									<s:property value="#post.author" />
									<br> <span style="font-size:10px;"><s:property value="#post.publishTime"/></span>
								</td>
								<td width="10%" valign="middle" align="center">
									<span style="color: green"><s:property
											value="#post.replyNum" />
									</span>/
									<s:property value="#post.views" />
								</td>
								<td width="40%" valign="middle" align="center">
								<s:if test="#post.replyTitle!=null&&#post.replyAuthorName!=null">
								  <s:property value="#post.replyTitle"/>
                                    <s:property value="#post.replyAuthorName" /><br>
									</s:if>
									<s:else>
									  <s:property value="#post.title"/>
                                    <s:property value="#post.author" /><br>
									</s:else>
									<s:property value="#post.lastReplyTime" />
									

								</td>
							</tr>
							</pg:item>
						</s:iterator>
					</table>

				</div>
			</div>
			<div>
				<div style="height: 32px;">
					<table width="100%">
						<tr>
							<td width="60%">
								    <pg:first>
							<a href="${pageUrl}&block=${requestScope.block}&title=${requestScope.title}">首页</a>
						      </pg:first>
					    	<pg:prev>
							<a href="${pageUrl}&block=${requestScope.block}&title=${requestScope.title}">&lt;&lt;上一页</a>
						  </pg:prev>
						 <pg:pages>
							 
								<s:if test="#request.currentPageNumber == #request.pageNumber}">
									<font color="red">${pageNumber}</font>
								</s:if>
								<s:else>
									<a href="${pageUrl}&block=${requestScope.block}&title=${requestScope.title}">${pageNumber}</a>
								</s:else>
							 
						</pg:pages>
						<pg:next>
							<a href="${pageUrl}&block=${requestScope.block}&title=${requestScope.title}">下一页&gt;&gt;</a>
						</pg:next>
				 
						&nbsp;跳转到第&nbsp;
						<input class="pageFont1" type="text" size="1"
							value="${currentPageNumber}" onchange="changeMeetingPage(this,'${requestScope.tempCond}')" />
						&nbsp;页
							</td>
							<td width="40%" align="right">
								<a href="./bbs/editor.jsp?"><img src="./images/newtopic.gif"
										border="0" />
								</a>
							</td>
						</tr>
					</table>
				</div>
			</div>

			<div></div>
		</div>
      </pg:pager>
	</body>
</html>
